//
//  MainViewController.m
//  LeagueOfLegend
//
//  Created by cc on 14-7-8.
//  Copyright (c) 2014年 cc. All rights reserved.
//

#import "MainViewController.h"
#import "WeekViewController.h"
#import "OfficialNewViewController.h"
#import "AgreeViewController.h"
#import "CustomTabBarVC.h"
#import "VideoViewController.h"
#import "WeeklyViewController.h"// 每周免费英雄 更新界面
@interface MainViewController ()

@end

@implementation MainViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    WeeklyViewController *weeklyView = [[WeeklyViewController alloc] init];// 每周免费英雄更新界面
//    WeekViewController *weekView = [[WeekViewController alloc] init];
    OfficialNewViewController *OfficialNewView = [[OfficialNewViewController alloc] init];
    AgreeViewController *AgreeView = [[AgreeViewController alloc] init];
    VideoViewController *vivdeo = [[VideoViewController alloc] init];
    
    
    UINavigationController *weeklyNav = [[UINavigationController alloc] initWithRootViewController:weeklyView];
//    UINavigationController *weekNav = [[UINavigationController alloc] initWithRootViewController:weekView];
    UINavigationController *OfficialNewNav = [[UINavigationController alloc] initWithRootViewController:OfficialNewView];
    UINavigationController *AgreeNav = [[UINavigationController alloc] initWithRootViewController:AgreeView];
    UINavigationController *vivdeoNav = [[UINavigationController alloc] initWithRootViewController:vivdeo];
    
    NSArray *array = [[NSArray alloc] initWithObjects:weeklyNav,OfficialNewNav,AgreeNav,vivdeoNav, nil];
    CustomTabBarVC *customTabBar = [[CustomTabBarVC alloc] init];
    customTabBar.viewControllers = array;
    customTabBar.selectedIndex = 0;
    
    UIWindow *window = [[[UIApplication sharedApplication] delegate] window];
    window.rootViewController = customTabBar;
   
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
